"use strict";
// interface Monitor {}
// class Monitor27 implements Monitor {}
exports.__esModule = true;
exports.Computer = void 0;
// interface Host {}
// class LegendHost implements Host {}
var _2_ioc_1 = require("./2.ioc");
var Computer = /** @class */ (function () {
    // 将具体的零件 通过参数传递
    function Computer(monitor, host) {
        this.monitor = monitor;
        this.host = host;
    }
    Computer.prototype.start = function () {
        console.log("组装好了,可以开机了");
    };
    return Computer;
}());
exports.Computer = Computer;
// 类的外部实例化组件(零件),参数传递的方式  解决第一个问题
var monitor = new _2_ioc_1.Monitor27();
var host = new _2_ioc_1.LegendHost();
var computer = new Computer(monitor, host);
computer.start();
